package cn.hx.mall_goods.service.impl;

import cn.hx.mall_goods.dao.FlashPromotionDao;
import cn.hx.mall_goods.entity.FlashPromotion;
import cn.hx.mall_goods.entity.PromotionProductRelation;
import cn.hx.mall_goods.entity.PromotionSession;
import cn.hx.mall_goods.service.FlashPromotionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 限时购表(FlashPromotion)表服务实现类
 *
 * @author liufeng
 * @since 2022-12-01 10:58:57
 */
@Service("flashPromotionService")
public class FlashPromotionServiceImpl implements FlashPromotionService {
    @Resource
    private FlashPromotionDao flashPromotionDao;

    @Override
    public FlashPromotion queryRecentOne() {
        return flashPromotionDao.queryRecentOne();
    }

    @Override
    public List<PromotionSession> getSecTime() {
        List<PromotionSession> secTime = flashPromotionDao.getSecTime();
        return secTime;
    }

    @Override
    public FlashPromotion queryOne(Long flashPromotionId) {
        return flashPromotionDao.queryFlashPromotion(flashPromotionId);
    }

    @Override
    public List<PromotionProductRelation> getRelationList() {
        return flashPromotionDao.getRelationList();
    }
}
